import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: resolve => require(['../views/Login.vue'], resolve)
  },
  {
    path: '/Home',
    component: resolve => require(['../views/Home.vue'], resolve),
    children:[
      {
        path: '/Info',
        component: resolve => require(['../components/InfoPage.vue'], resolve)
      },
      {
        path: '/Consumer',
        component: resolve => require(['../components/ConsumerPage.vue'], resolve)
      },
      {
        path: '/Singer',
        component: resolve => require(['../components/SingerPage.vue'], resolve)
      },
      {
        path: '/SongList',
        component: resolve => require(['../components/SongListPage.vue'], resolve)
      },
      {
        path: '/Song',
        component: resolve => require(['../components/SongPage.vue'], resolve)
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
